package glemipsc.implementations.glemips32;

public class Immediate implements glemipsc.implementations.Argument {
	int n;
	
	public Immediate(int n) {
		this.n = n;
	}
	
	public String getOpCode() {
		String code = Integer.toBinaryString(n);
		if (code.length() > 16)
			code = code.substring(code.length()-16);
		if (code.length() < 16)
			while (code.length() < 16) code = "0" + code;
		return code;
	}
	
	public String toString() {
		return Integer.toString(n);
	}
}
